﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRequerimiento.aspx.cs" Inherits="UI.Logistica.frmRequerimiento" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            text-align: center;
        }
        .style3
        {
            width: 271px;
        }
        .style4
        {
            width: 58px;
        }
        .style5
        {
            width: 154px;
        }
        .style6
        {
            text-align: left;
            width: 60px;
        }
        .style8
        {
            width: 144px;
        }
        .style10
        {
            width: 65px;
        }
        .style11
        {
        }
        .style12
        {
            width: 259px;
        }
        .style13
        {
            height: 23px;
        }
        .style14
        {
            height: 23px;
            text-align: left;
        }
        .style15
        {
            width: 259px;
            height: 23px;
        }
        .style16
        {
            width: 144px;
            height: 23px;
        }
        .style18
        {
            text-align: center;
            width: 60px;
            height: 38px;
        }
        .style19
        {
            width: 286px;
            height: 38px;
        }
        .style20
        {
            width: 58px;
            height: 38px;
        }
        .style21
        {
            width: 154px;
            height: 38px;
        }
        .style22
        {
            height: 38px;
        }
        .style23
        {
            text-align: center;
            width: 39px;
        }
        .style24
        {
            text-align: center;
            width: 39px;
            height: 38px;
        }
        .style25
        {
            width: 286px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

    
   <table class="BTabla" style="width: 781px" >
            <tr>
                <td>
<table class="style1" style="width: 98%">
        <tr>
            <td class="filaTabla" align="left" colspan="6">
                Requerimiento</td>
        </tr>
        <tr>
            <td class="style23">
                &nbsp;</td>
            <td class="style6">
                &nbsp;</td>
            <td class="style25">
                &nbsp;</td>
            <td class="style4">
                &nbsp;</td>
            <td class="style5">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style24">
                </td>
            <td class="style18">
                <asp:Label ID="Label5" runat="server" Text="Nro. Req."></asp:Label>
            </td>
            <td class="style19">
                <asp:Label ID="lblRequerimiento" runat="server" Font-Size="Large" 
                    ForeColor="Red"></asp:Label>
            </td>
            <td class="style20">
                <asp:Label ID="Label2" runat="server" Text="Fecha"></asp:Label>
            </td>
            <td class="style21">
                <asp:Label ID="lblFecha" runat="server"></asp:Label>
            </td>
            <td class="style22">
                </td>
        </tr>
        <tr>
            <td class="style23">
                &nbsp;</td>
            <td class="style6">
                <asp:Label ID="Label1" runat="server" Text="Área"></asp:Label>
            </td>
            <td class="style25">
                <asp:DropDownList ID="ddlCentroCosto" runat="server" Width="251px">
                </asp:DropDownList>
            </td>
            <td class="style4">
                <asp:Label ID="Label4" runat="server" Text="Usuario"></asp:Label>
            </td>
            <td class="style5">
                <asp:Label ID="lblUsuario" runat="server" style="font-weight: 700"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style23">
                &nbsp;</td>
            <td class="style6">
                &nbsp;</td>
            <td class="style25">
                &nbsp;</td>
            <td class="style4">
                &nbsp;</td>
            <td class="style5">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2" colspan="6">
                <asp:Button ID="btnNuevo" runat="server" Height="32px" onclick="btnNuevo_Click" 
                    Text="Nuevo" Width="87px" />
                <asp:Button ID="btnAgregar" runat="server" Height="33px" Text="Agregar" 
                    Width="85px" onclick="btnAgregar_Click" />
                <asp:Button ID="btnGrabar" runat="server" Height="31px" Text="Grabar" 
                    Width="89px" onclick="btnGrabar_Click" 
                    onclientclick="return confirm('¿Esta seguro que desea Grabar?');" />
                <asp:Button ID="btnCancelar" runat="server" Height="31px" Text="Cancelar" 
                    Width="88px" onclick="btnCancelar_Click" />
                <asp:Button ID="btnEliminar" runat="server" Height="32px" 
                    onclick="btnEliminar_Click" Text="Eliminar" Width="85px" />
                <asp:Label ID="lblMensaje" runat="server" ForeColor="Red"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style23">
                &nbsp;</td>
            <td class="style6">
                &nbsp;</td>
            <td class="style25">
                &nbsp;</td>
            <td class="style4">
                &nbsp;</td>
            <td class="style5">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>

                    </td>
            </tr>
        </table>
&nbsp;<table class="style1" style="width: 93%">
        <tr>
            <td align="center">
                <asp:GridView ID="grvRequerimiento" runat="server" AutoGenerateColumns="False" 
                    Width="762px" Caption="Artículos Registrados" 
                    DataKeyNames="Item,Descripcion,Codigo_Articulo,Cantidad">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkArticulo" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="item" HeaderText="Item" />
                        <asp:BoundField DataField="codigo_Articulo" HeaderText="Código" />
                        <asp:BoundField DataField="Descripcion" HeaderText="Artículo" >
                            <ItemStyle HorizontalAlign="Left" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Cantidad" >
                            <ItemTemplate>
                                <asp:TextBox ID="txtCantidad" runat="server" Text='<%#Eval("Cantidad") %>' Width="62px"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:DropDownList ID="DropDownList1" runat="server" Width="123px">
                                    <asp:ListItem>UND</asp:ListItem>
                                    <asp:ListItem>ROLLO</asp:ListItem>
                                    <asp:ListItem>MILLAR</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
    
    </ContentTemplate>
    </asp:UpdatePanel>    

    <asp:ModalPopupExtender ID="mdArticulos" runat="server"
    TargetControlID="btn"
    PopupControlID="Panel1"              
    BackgroundCssClass="modalBackground">
    
    
    </asp:ModalPopupExtender>
    <asp:HiddenField ID="btn" runat="server" />    

    <asp:Panel ID="Panel1" CssClass="modalPopup" runat="server" Width="629px">

        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
        <table class="BTabla">
            <tr>
                <td>
                    <table style="width: 594px">
                        <tr>
                            <td class="filaTabla" colspan="4">
                                Lista de Artículos</td>
                            <tr>
                                <td class="style11">
                                    &nbsp;</td>
                                <td class="style10">
                                    &nbsp;</td>
                                <td class="style12">
                                    &nbsp;</td>
                                <td class="style8">
                                    &nbsp;</td>
                                <tr>
                                    <td class="style11">
                                        &nbsp;</td>
                                    <td class="style10">
                                        <asp:Label ID="Label6" runat="server" Text="Artículo"></asp:Label>
                                    </td>
                                    <td class="style12">
                                        <asp:TextBox ID="txtArticulo" runat="server" Height="22px" Width="307px"></asp:TextBox>
                                    </td>
                                    <td class="style8">
                                        <asp:Button ID="btnBuscar2" runat="server" Height="32px" Text="Buscar" 
                                            Width="90px" onclick="btnBuscar2_Click" />
                                    </td>
                                    <tr>
                                        <td class="style13">
                                            </td>
                                        <td class="style14" colspan="2">
                                            <asp:Label ID="lblMensajeModal" runat="server" ForeColor="Red"></asp:Label>
                                            </td>
                                        <td class="style16">
                                            </td>
                                    </tr>
                                </tr>
                            </tr>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <table style="width: 588px">
            <tr>
                <td align="center">
                    <asp:GridView ID="grvArticulo" runat="server" AutoGenerateColumns="False" 
                        Caption="Lista de Artículos" Width="578px" AllowPaging="True" 
                        DataKeyNames="Id_Articulo,Descripcion,Codigo_Articulo" 
                        onselectedindexchanged="grvArticulo_SelectedIndexChanged" PageSize="20">
                        <Columns>
                            <asp:CommandField ShowSelectButton="True" SelectText="Agregar" />
                            <asp:BoundField DataField="Id_Articulo" HeaderText="Código" />
                            <asp:BoundField DataField="descripcion" HeaderText="Artículo">
                            <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Cantidad">
                                <ItemTemplate>
                                    <asp:TextBox ID="txtCantidad" runat="server" Width="70px"></asp:TextBox>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
            <asp:Button ID="btnCerrar" runat="server" Height="31px" 
                onclick="btnCerrar_Click" Text="Cerrar" Width="87px" />
         <br />
        </ContentTemplate>
        </asp:UpdatePanel>       
        
       

    
    </asp:Panel>
    

    
    
        <asp:UpdateProgress ID="UpdateProgress1"     runat="server" DisplayAfter="0" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
       <div class="overlay" runat="server"/>
      <div class="overlayContent" runat="server">
        <h2>Cargando...</h2>
         <img runat="server" src="~/Imagenes/Botones/cargando.gif" alt="Cargando" border="1" />
        </panel>
                </div>                      
        </ProgressTemplate>
        </asp:UpdateProgress>
     
    
</asp:Content>
